package com.yeyks.common.em.cnbooking;

import com.yeyks.common.em.ComfortEnum;
import com.yeyks.common.em.StarLevelEnum;

/**
 * @author fuchangshuai
 * @date 2019/09/23 14:07
 */
public class CnStarLineTypeEnum {
    public enum CnStar {
        ONE_STAR("012009", "一星"),
        EMPTY_TWO_STAR("012011", "二星"),
        TWO_STAR("012012", "二星"),
        EMPTY_THREE_STAR("012013", "三星"),
        THREE_STAR("012014", "三星"),
        EMPTY_FOUR_STAR("012015", "四星"),
        FOUR_STAR("012016", "四星"),
        EMPTY_FIVE_STAR("012017", "五星"),
        FIVE_STAR("012018", "五星"),
        EMPTY_SIX_STAR("012019", "六星"),
        SIX_STAR("012020", "六星");
        String value;
        String desc;

        CnStar(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public String value() {
            return this.value;
        }

        public String desc() {
            return this.desc;
        }

        public static String getDesc(String value) {
            for (CnStar cnStar : values()) {
                if (cnStar.value().equals(value)) {
                    return cnStar.desc();
                }
            }
            return null;
        }

        public static String getValue(String desc) {
            for (CnStar cnStar : values()) {
                if (cnStar.desc().equals(desc)) {
                    return cnStar.value();
                }
            }
            return null;
        }
    }

    public enum CnToMyStar {
        MY_ONE_STAR("012009", String.valueOf(StarLevelEnum.HOMESTAY.value())),
        MY_EMPTY_TWO_STAR("012011", String.valueOf(StarLevelEnum.BUSINESS.value())),
        MY_TWO_STAR("012012", String.valueOf(StarLevelEnum.BUSINESS.value())),
        MY_EMPTY_THREE_STAR("012013", String.valueOf(StarLevelEnum.THREESTAR.value())),
        MY_THREE_STAR("012014", String.valueOf(StarLevelEnum.THREESTAR.value())),
        MY_EMPTY_FOUR_STAR("012015", String.valueOf(StarLevelEnum.FOURSTAR.value())),
        MY_FOUR_STAR("012016", String.valueOf(StarLevelEnum.FOURSTAR.value())),
        MY_EMPTY_FIVE_STAR("012017", String.valueOf(StarLevelEnum.FIVESTAR.value())),
        MY_FIVE_STAR("012018", String.valueOf(StarLevelEnum.FIVESTAR.value())),
        MY_EMPTY_SIX_STAR("012019", String.valueOf(StarLevelEnum.FIVESTAR.value())),
        MY_SIX_STAR("012020", String.valueOf(StarLevelEnum.FIVESTAR.value()));
        String value;
        String desc;

        CnToMyStar(String value, String desc) {
            this.value = value;
            this.desc = desc;
        }

        public String value() {
            return this.value;
        }

        public String desc() {
            return this.desc;
        }

        public static String getDesc(String value) {
            for (CnToMyStar cnToMyStar : values()) {
                if (cnToMyStar.value().equals(value)) {
                    return cnToMyStar.desc();
                }
            }
            return null;
        }

        public static String getValue(String desc) {
            for (CnToMyStar cnToMyStar : values()) {
                if (cnToMyStar.desc().equals(desc)) {
                    return cnToMyStar.value();
                }
            }
            return null;
        }
    }

    public enum CnToMyComfort {
        MY_ONE_STAR("012009", ComfortEnum.SHUSHI.value()),
        MY_EMPTY_TWO_STAR("012011", ComfortEnum.SHUSHI.value()),
        MY_TWO_STAR("012012", ComfortEnum.SHUSHI.value()),
        MY_EMPTY_THREE_STAR("012013", ComfortEnum.GAODANG.value()),
        MY_THREE_STAR("012014", ComfortEnum.GAODANG.value()),
        MY_EMPTY_FOUR_STAR("012015", ComfortEnum.GAODANG.value()),
        MY_FOUR_STAR("012016", ComfortEnum.GAODANG.value()),
        MY_EMPTY_FIVE_STAR("012017", ComfortEnum.HAOHUA.value()),
        MY_FIVE_STAR("012018", ComfortEnum.HAOHUA.value()),
        MY_EMPTY_SIX_STAR("012019", ComfortEnum.HAOHUA.value()),
        MY_SIX_STAR("012020", ComfortEnum.HAOHUA.value());
        String value;
        Integer desc;

        CnToMyComfort(String value, Integer desc) {
            this.value = value;
            this.desc = desc;
        }

        public String value() {
            return this.value;
        }

        public Integer desc() {
            return this.desc;
        }

        public static Integer getDesc(String value) {
            for (CnToMyComfort cnToMyComfort : values()) {
                if (cnToMyComfort.value().equals(value)) {
                    return cnToMyComfort.desc();
                }
            }
            return null;
        }

        public static String getValue(Integer desc) {
            for (CnToMyComfort cnToMyComfort : values()) {
                if (cnToMyComfort.desc().equals(desc)) {
                    return cnToMyComfort.value();
                }
            }
            return null;
        }
    }

}
